package com.mohe.zhihui.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegExHtmlUtils {

	/**
	 * 去除字符串中的html标签
	 * 
	 * @param str
	 * @return
	 */
	public static String regEx_html(String htmlStr) {

		// 定义HTML标签的正则表达式
		String regEx = "<[^>]+>";

		// 过滤html标签
		Pattern p_html = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);
		Matcher m_html = p_html.matcher(htmlStr);
		htmlStr = m_html.replaceAll("");

		return htmlStr;
	}
}
